<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: popup_image.php 95 2013-09-21 12:05:05Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 95 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 12:05:05 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

  require('includes/application_top.php');

  reset($_GET);
  while (list($key, ) = each($_GET)) {
    switch ($key) {
      case 'banner':
        $banners_id = $_GET['banner'];

        $banner = $db->db_query("SELECT banners_title, banners_image, banners_html_text from ".TABLE_BANNERS." WHERE banners_id = ".$db->db_prepare($banners_id)."");

        $page_title = $banner->fields['banners_title'];

        if ($banner->fields['banners_html_text']) 
          $image_source = $banner->fields['banners_html_text'];
        elseif ($banner->fields['banners_image']) 
          $image_source = image(HTTP_CATALOG_SERVER.DIR_WS_CATALOG_IMAGES.$banner->fields['banners_image'], $page_title);
        break;
    }
  }
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<title><?php echo $page_title; ?></title>
<script type="text/javascript"><!--
var i=0;

function resize() {
  if (navigator.appName == 'Netscape') i = 40;
  window.resizeTo(document.images[0].width + 30, document.images[0].height + 60 - i);
}
//--></script>
</head>
<body onload="resize();">
<?php echo $image_source; ?>
</body>
</html>